package production.practice.common.exection;

import org.springframework.web.bind.annotation.RestControllerAdvice;
import production.practice.pojo.fuction.result.Result;

@RestControllerAdvice
public class ExceptionHandler {
    @org.springframework.web.bind.annotation.ExceptionHandler(BaseException.class)
    public Result handleException(BaseException e){
        return Result.error(e.getMessage());
    }
}
